pp108 : Translating Validation and UFO Messages

Translating Validation and UFO Messages

This topic describes the procedure to translate validation messages and UFO messages.

The messages that display in any XForm are attributed to one of the below sources:

  • Default messages and tooltips of an XForm
  • Default labels in the user interface
  • Custom messages added to an XForm

NOTE
For details about the message types available in Process Platform, see Overview of Unified Feedback Objects.

Default validation messages and tooltips for the XForms

While formatting a control in Process Platform, you can define a datatype for the control, specify constraints, and provide validation messages for the constraints. For example, for a control of the datatype integer, the default validation message will be Enter a non-empty value for {0}; where the insertion, {0}, is replaced with the respective values at run time.

The default messages and tooltips of an XForm are bundled together in the cordys.Xforms.messages.xml message bundle. To translate the messages and tooltips of the message bundle, you need to create an XML file for each translation language, and specify the translations in it. For example, to translate into the Dutch language, create cordys.Xforms.messages_nl-NL.xml and provide the translations.

Default error messages and UFO labels in any User interface

The messages used in the Unified Feedback Objects (UFOs) are bundled as Cordys.Ufo.messages.xml as part of the installation. In order to provide the translation of these messages, you need to create a message bundle and add the language code as a suffix to the file name. For example, create cordys.Ufo.messages_nl-NL.xml for the Dutch language translation.

Custom messages used in the XForms

You can add custom messages to an XForm using the Messages tab available in the XForms Designer. The custom messages that you add will be available in the Translation Editor for translation.

  1. In the My Applications App Palette, select to display the Workspace Documents window. You can initiate the translation process from the project context or document context.
  2. Edit the translation of a message. To do so, type the new translated message under the corresponding language column.

    NOTE
    Ensure that the labels or messages that you define do not contain a mix of single quotation marks and double quotation marks.

  3. Delete the messages that are not used in your document and click . The messages and translations are saved as a.mlm file in the XML Store.

    NOTE
    If you do not delete unused messages from the Messages tab, all the messages will be saved to the.mlm file.

The messages for your document are translated.

You can also provide custom messages programmatically in your applications using the localization_get() method. For details, see localization_get().

Related tasks

Reconstructing Missing Translations